﻿using PRO.Admin;
using PRO.Cache;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace web.Manage
{
    public partial class removecache : ManageBase
    {
        protected StringBuilder cache_list = new StringBuilder();
        protected void Page_Load(object sender, EventArgs e)
        {
            IDictionaryEnumerator CacheEnum = HttpRuntime.Cache.GetEnumerator();
            DefaultCacheStrategy _cache = new DefaultCacheStrategy();
            string key = null;
            int counts = 0;

            while (CacheEnum.MoveNext())
            {
                key = CacheEnum.Key.ToString();
                _cache.RemoveObject(key);
                cache_list.AppendFormat("<li>●  已清除缓存：<b>[{0}]</b></li>", key);
                counts++;
            }
            if (counts == 0)
                cache_list.Append("<li>●  没有缓存数据</li>");
        }
    }
}